{{extend "wiki_layout.html"}}
{{block content}}
<form action="{{=url_for('wiki.views.wiki_diff', pagename=wiki.name)}}" method="GET">
<table>
<thead>
<tr><th>#</th><th>Date</th><th><input type="submit" value="Compare"/></th><th>User</th><th>Actions</th></tr>
</thead>
<tbody>
{{i = 0}}
{{for item in changeset:}}
    {{i += 1}}
    <tr>
    <td>{{=item.revision}}</td>
    <td>{{=item.modify_time.strftime('%Y-%m-%d %H:%M:%S')}}</td>
    <td>
        <input type="radio" name="rev1" value="{{=item.revision}}"{{if i==2:}} checked{{pass}}>
        <input type="radio" name="rev2" value="{{=item.revision}}"{{if i==1:}} checked{{pass}}>
    </td>
    <td>{{=item.editor or 'uliwiki'}}</td>
    <td>
        <a href="{{=url_for('wiki.views.wiki_page', pagename=wiki.name)}}?rev={{=item.revision}}">View</a> 
        {{if i!=1:}}<a href="{{=url_for('wiki.views.wiki_revert', pagename=wiki.name)}}?rev={{=item.revision}}">Revert</a>{{pass}}
    </td>
    </tr>
{{pass}}
</tbody>
</table>
</form>
{{end}}
{{block header}}<h1><a href="{{=url_for('wiki.views.wiki_page', pagename=wiki.name)}}">{{=wiki.title}}</a></h1>{{end}}